<template>
  <!-- 资讯栏目-->
  <div>
    <ul class="flexWap padding15 borderB1">
    
      <li class="wid250px marginB10 marginR10">
        <el-input placeholder="请输入搜索的内容" @change="search" v-model="pages.keyWord" :clearable="true">
        </el-input>
      </li>
      <li class="wid250px marginB10 marginR10">
        <el-select style="width: 100%;" v-model="pages.keyWord" placeholder="请选择">
            <el-option
              v-for="(item,index) in options"
              :key="index"
              :label="item.name"
              :value="item.id">
            </el-option>
          </el-select>
       
      </li>
      <li class="marginB10 marginR10">
        
        <el-button type="primary" @click="search">查询</el-button>
      </li>
      <li class="marginB10 marginR10">
        
        <el-button type="primary" @click="add">新增</el-button>
      </li>
      <li class="marginB10 marginR10">
        <el-button type="danger">批量删除</el-button>
      </li>
    </ul>
      
    <div class="padding15">
        <p class="paddingB15">已选择 <span class="colorRed">{{multipleSelection.length}}</span> 条数据</p>
      <el-table
              :data="lists"
              height="580"
              stripe
              border
              ref="multipleTable"
              @selection-change="handleSelectionChange"
              style="width: 100%">
              <el-table-column type="selection" width="55"/>
              <el-table-column align="center" type="index" label="序号" width="50" />
      
        <el-table-column align="center" prop="organizationName" label="栏目名称"/>
        <el-table-column  align="center" prop="title" label="资讯数量"  />
        <el-table-column label="操作" align="center" width="140" fixed="right">
          <template slot-scope="scope">
             <div>
              <el-button size="mini"  type="primary"@click="edit(scope.row)">编辑</el-button>
              <el-dropdown style="margin-left: 10px;" trigger="click"  @command="handleCommand($event,scope.row)">
                <span class="el-dropdown-link">
                  ...<i class="el-icon-caret-bottom el-icon--right"></i>
                </span>
                <el-dropdown-menu slot="dropdown">
                  <el-dropdown-item style="color: #F56C6C !important;" command="del">
                    删除
                      <!-- <el-button size="mini"  type="danger" @click="handleDelete(scope.row)">删除</el-button> -->
                  </el-dropdown-item>
                  <el-dropdown-item class="clearfix" command="look">
                    查看
                  </el-dropdown-item>
            
                </el-dropdown-menu>
              </el-dropdown>
             </div>
          </template>
         
        </el-table-column>
      </el-table>
      <Pagination :total="total" :pages="pages" :searchQuery="searchQuery"></Pagination>
    </div>
  </div>
</template>
<script>
  // import {questionnaireRecordReportList,questionnaireRecordDel} from '@/assets/api/api'
  import {Mixin} from '@/assets/mixins/mixin'
  import moment from 'moment'
  export default {
    name:'InformationColumnList',
    mixins: [Mixin],
    components:{
    },
    data(){
      return{
        addEditPath:'/realTimeInfo/addEditInformationColumn',//新增编辑的路径
        pageLoading:false,
        multipleSelection:[],
        options:[{name:'请选择',id:''}],
         
        title:'新增',
        pages:{ //分页搜索
          keyWord:'',
          page:1,
          size:10,
        },
        total:0,// 总条数
        loading:false,//加载中...
        lists:[{id:1}],
        detailObj:{},//点击每行的详情数据
        
      }
    },
    created() {
       console.log(this.isPage,'this.isPage')
       console.log(this.pageIs,'this.pageIs')
    },
    methods:{
      handleCommand(command,v){
          console.log(v,'scope.row')
          if(command==='del'){//删除
              this.handleDelete(v);
          }else if(command==='look'){//查看
              this.handleLook(v)
          }
      },
      close(){
         this.explainShow = false;
         this.spsecificationsShow = false;
      },
      handleSelectionChange(val) {//多选
        this.multipleSelection = val;
      },
     
      selectSubmit(v){//选择
           this.$emit('submit',v);
      }
    }
  }
</script>
<style lang="scss" scoped>
::v-deep .el-input-group__append, ::v-deep.el-input-group__prepend{
    color: #fff;
  }

</style>
